package com.wander.designStructural.decorator;

/**
 * @Author : WDYin
 * @Date : 2021/1/19
 * @Desc : 装饰器，实现Component接口的同时在内部维护一个ConcreteDecorator的实例，
 *         通过构造函数初始化。
 *
 */
public class Decorator implements Component{

    private Component component;

    public Decorator(Component component) {
        this.component = component;
    }

    @Override
    public void music() {
        component.music();
    }
}
